package com.rose.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.rose.common.utils.PageUtils;
import com.rose.mall.product.entity.BrandEntity;
import com.rose.mall.product.entity.CategoryBrandRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author rose
 * @email 1942951600@qq.com
 * @date 2021-06-10 15:38:01
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    // 根据params返回需要的 IPage<CategoryBrandRelationEntity>
    PageUtils queryPage(Map<String, Object> params);

    //保存关联表和其附带的冗余字段
    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    // 更新brandId 和 brandName
    void updateBrand(Long brandId, String name);

    //更新关联表里面的分类id和名称
    void updateCategory(Long catId, String name);

    List<BrandEntity> getBrandByCatId(String catId);
}

